import React, { PureComponent } from 'react';
import { Card } from 'antd';
import moment from 'moment';
import DescriptionList from '@/components/DescriptionList';

const { Description } = DescriptionList;
class EmpInfor extends PureComponent {
  render() {
    const { baseInfo } = this.props;

    return (
      <div>
        <Card title={<span>基本信息</span>} id="basicInfor">
          {baseInfo && (
            <DescriptionList>
              <Description term="姓名">{baseInfo.empName || '--'}</Description>
              <Description term="证件类型">{baseInfo.certTypeName || '--'}</Description>
              <Description term="证件号">{baseInfo.certNo || '--'}</Description>
              <Description term="性别">{baseInfo.genderName || '--'}</Description>
              <Description term="国籍">{baseInfo.nationName}</Description>
              <Description term="出生日期">
                {baseInfo.birthDate ? moment(baseInfo.birthDate).format('YYYY-MM-DD') : '--'}
              </Description>

              <Description term="电话">{baseInfo.mobile || '--'}</Description>
              <Description term="员工邮箱">{baseInfo.email || '--'}</Description>
              <Description term="在职状态">{baseInfo.entryStatusName || '--'}</Description>
            </DescriptionList>
          )}
        </Card>
      </div>
    );
  }
}

export default EmpInfor;
